<?php
use yii\widgets\ActiveForm;
use yii\helpers\Html;
use common\components\widgets\Datetimepicker;
Datetimepicker::widget(['timepicker' => 'true','datepicker'=>'false','format'=>'H:i','step'=>'5']);
?>
<div class="yx-praise-list-box yx-praise-box yx-radius2 zx-min-height" >
    <?php $form = ActiveForm::begin(['enableAjaxValidation' => true,'enableClientValidation' => false,'options'=>['class'=>'form-validate']]); ?>
    <table width="90%" class="table-form" >
        <tr>
            <th class="zx-goods-table"><?= $model->attributeLabels()['title']; ?></th>
            <td><?= $form->field($model, 'title', ['template' => '{input}{error}{hint}'])->textInput(['style' => 'width:180px','class' => 'input-text']) ?></td>
        </tr>
        <tr>
            <th class="zx-goods-table"><?= $model->attributeLabels()['keyword']; ?></th>
            <td><?= $form->field($model, 'keyword', ['template' => '{input}{error}{hint}'])->textInput(['style' => 'width:180px','class' => 'input-text']) ?></td>
        </tr>
        <tr>
            <th class="zx-goods-table"><?= $model->attributeLabels()['menu_id']; ?></th>
            <td style="display: inline-block;width: 206px"><?= $form->field($model, 'menu_id', ['template' => '{input}{error}{hint}'])->widget(\kartik\select2\Select2::className(),['data'=>$nav,'options' => ['placeholder' => '请选择']]) ?></td>
        </tr>
        <tr>
            <th class="zx-goods-table"><?= $model->attributeLabels()['picture']; ?></th>
            <td><?= $form->field($model, 'picture', ['template' => '{input}{error}{hint}'])->widget(\doumiaoduo\ueditor\ImageUploadSingle::className(), [
                    'clientOptions' => ['serverUrl' => \common\components\helpers\Fun::url(['/uploader/action']),],
                    'buttonOptions' => ['class' => 'button'],
                ])?></td>
        </tr>
        <tr>
            <th class="zx-goods-table"><?= $model->attributeLabels()['description']; ?></th>
            <td><?= $form->field($model, 'description', ['template' => '{input}{error}{hint}'])->textarea(['style' => 'width:380px','class' => 'input-text']) ?></td>
        </tr>
        <tr>
            <th class="zx-goods-table"><?= $model->attributeLabels()['content']; ?></th>
            <td><?= $form->field($model, 'content', ['template' => '{input}{error}{hint}'])->widget(\doumiaoduo\ueditor\Ueditor::className(), ['clientOptions' => [
                    'serverUrl' => \common\components\helpers\Fun::url(['/uploader/action']),
                    'toolbars' => [['fullscreen', 'source', '|', 'undo', 'redo', '|', 'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'rowspacingtop', 'rowspacingbottom', 'lineheight', '|', 'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', 'simpleupload']],
                    'initialFrameWidth' => '100%'
                ],]); ?></td>
        </tr>
        <tr>
            <th class="zx-goods-table"><?= $model->attributeLabels()['sort_order']; ?></th>
            <td><?= $form->field($model, 'sort_order', ['template' => '{input}{error}{hint}'])->textInput(['style' => 'width:180px','class' => 'input-text'])->hint('数字越大靠前')?></td>
        </tr>
        <tr>
            <th class="zx-goods-table"><?= $model->attributeLabels()['status']; ?></th>
            <td><?= $form->field($model, 'status', ['template' => '{input}{error}{hint}'])->radioList([1=>'启用',2=>'禁用'],['style' => 'width:180px','class' => 'input-radiolist']) ?></td>
        </tr>
        <tr>
            <th class="zx-goods-table"><?= $model->attributeLabels()['is_top']; ?></th>
            <td><?= $form->field($model, 'is_top', ['template' => '{input}{error}{hint}'])->radioList([0=>'否',1=>'是'],['style' => 'width:180px','class' => 'input-radilList']) ?></td>
        </tr>
    </table>
</div>
<div class="m_top_10 btn" style="width: 100%">
    <?= \yii\helpers\Html::submitButton('提交', ['class' => "button", 'id' => 'dosubmit']) ?>
</div>
<?php \yii\widgets\ActiveForm::end(); ?>


<script>
</script>

